<?php $params = array('catId'=>$cat['catId'], 'partnerUrl'=>$partner['url']); ?>    
<?php $this->renderPartial('//partials/partnerMenu', array('partner'=>$partner, 'advertCode'=>$advertCode, 'cat'=>$cat, 'errorModel'=>$errorModel, 'userIsWork'=>$userIsWork, 'relProfiles'=>$relProfiles, 'subCats'=>$subCats, 'curent'=>'news','show_tabs'=>1));?> 
<div class="padding4020">
<?php if(!empty($news)) : ?>
    <?php foreach ($news as $item) : ?>
        <div class="news">
            <div class="news_date"><?php echo Yii::app()->dateFormatter->format("dd MMMM yyyy года", $item['date']); ?></div>
            <div ><a style="font-size:16px;" href="<?php echo Yii::app()->createUrl('partner/news/news', CMap::mergeArray($params, array('url'=>$item['url'])) ); ?>"><?php echo $item['title']; ?></a></div>
           <div style="font-size:13px;margin: 18px 0px 20px 0px;">
               <?php echo CPartnerkiHelper::getShortText(strip_tags($item['text'],'<p><br>'), 240); ?>
            </div>
            <div style="font-size:13px;">
                <a href="<?php echo Yii::app()->createUrl('partner/news/news', CMap::mergeArray($params, array('url'=>$item['url']))); ?>">Читать далее</a> &nbsp;
                <?php echo $item['countCom']; ?>
                <?php if(!Yii::app()->user->isGuest) : ?>
                    <span class="comments_green">
                        <?php                            
                        if(!empty($countReadCom)) {
                            foreach ($countReadCom as $read) : 
                                $count = 0;
                                if($read['newsId'] == $item['newsId']) : 
                                    $count = $read['count'];
                                    break;
                                endif; 
                            endforeach; 
                        }

                        if(empty($count)) {
                            echo $item['countCom'] ? ' + '.$item['countCom'] : '';
                        } elseif($count) {
                            $count = $item['countCom'] - $count;
                            echo $count ? ' + '.$count : '';
                        } ?>
                    </span>
                <?php endif; ?>
               комментариев   
           </div>
        </div>
      
    <?php endforeach; ?>
<?php else : ?>
    Сейчас нет новостей для этой категории.    
<?php endif; ?>
<div class="pages"><?php $this->widget('CLinkPager', array('pages' => $pagination)); ?> </div>    

</div>